home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4209 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question on argv
  5. Date: 02 Feb 1996 18:36:00 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Feb2113600@qcd.lanl.gov>
  8. References: <4eoq3c$45j@usenet.ucs.indiana.edu> <4epkmo$231@transfer.stratus.com>
  9.     <TANMOY.96Feb1085901@qcd.lanl.gov> <9602012245.AA05565@dxmint.cern.ch>
  10. NNTP-Posting-Host: qcd.lanl.gov
  11. Mime-Version: 1.0
  12. Content-Type: text
  13. In-reply-to: Dan Pop's message of Thu, 1 Feb 1996 23:45:54 +0100
  14.  
  15. In article <9602012245.AA05565@dxmint.cern.ch> Dan Pop
  16. <danpop@mail.cern.ch> writes: 
  17. <snip>
  18.    tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) writes:
  19.  
  20.    >In article <4epkmo$231@transfer.stratus.com> "David L. McReynolds"
  21.    ><David_McReynolds@vos.stratus.com> writes: 
  22.    ><snip>
  23.    >   argv is an array of pointers to arrays of chars. Therefore
  24.    >   you will have to do something like
  25.    >
  26.    >This is loose wording (but, then, even the standard makes exactly the
  27.    >same mistake in at least one place). argv is an array of pointers to
  28.    >the first elements of arrays of chars. (Pointers to arrays are
  29.    >completely different beasts :-)
  30.  
  31.    No way.  argv isn't (and _cannot_ be) an array at all.  It is a char **
  32.    pointing to the first char * from an array of char pointers.
  33.  
  34.    If anybody has doubts about this, sizeof argv should clear them up.
  35.  
  36. Touche!
  37.  
  38. argv is a modifiable pointer to the first of a contiguous sequence of
  39. possibly unmodifiable pointers which are either NULL (the last one) or
  40. point to the first elements of a contiguous sequence of modifiable
  41. chars, the last of which is a '\0'.
  42.  
  43. Cheers
  44. Tanmoy
  45. --
  46. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  47. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  48. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  49. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  50. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  51. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  52.